<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns="http://www.w3.org/1999/xhtml">

<head>
    <title>CCC CRM Integration Demo</title>

</head>

<body>

<h1 th:inline="text">Hello [[${userName}]]</h1>

<p>Click
    <a th:href="@{/customers}">here</a> to see a customer list.</p>

<hr/>

<p>可执行的操作：</p>

<div th:if="${userName} == admin and ${ak} != null">
    <p>
        <a th:href="@{/ccc/register}">云呼坐席操作</a>
    </p>
    <p>
        <a th:href="@{/users}">查看用户</a>
    </p>
</div>

<div th:if="${userName} != null and ${ak} != null">
    <p>
        <a th:href="@{/workbench}">进入坐席工作台</a>
    </p>
</div>

<div th:if="${userName} == admin">
    <p>
        <a th:href="@{/admin/register}">录入或修改管理员信息</a>
    </p>
</div>

<hr/>
<form th:action="@{/logout}" method="post">
    <input type="submit" value="Sign Out"/>
</form>

</body>

</html>
